/*
 * testlexer.c
 *
 *  Created on: 2013-5-12
 *      Author: xkaying
 */


#include "../parser/lexer.h"

#include <stdio.h>

int main()
{
	char buff[4096];
	FILE *fl;
	fl=fopen("test.l","rt");
	if(fl==0){
		printf("not find\n");
	}
	int len;
	len=fread(buff,1,4096,fl);
	Lexer *plexer;
	if(len){
		plexer=LexerParser(buff,len);
		printf("read %d\n",len);
		if(!plexer){
			return 0;
		}
		//输出lexer
		 LexerPrint(plexer,stdout);
	}
	printf("this is a hello world\n");
}
